//
//  MSLNewsTableViewCell.m
//  MSLNews
//
//  Created by lirenqiang on 16/6/12.
//  Copyright © 2016年 lirenqiang. All rights reserved.
//

#import "MSLNewsTableViewCell.h"
#import "MSLNewsModel.h"
@interface MSLNewsTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *msl_ImageView;

@property (weak, nonatomic) IBOutlet UILabel *msl_Title;

@property (weak, nonatomic) IBOutlet UILabel *msl_digest;

@property (weak, nonatomic) IBOutlet UILabel *msl_replyCount;

@end

@implementation MSLNewsTableViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}

+ (instancetype)cellWithTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath {
    
    MSLNewsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:MSLNewsTableViewCellId forIndexPath:indexPath];
    
    return cell;
}

- (void)setNewsModel:(MSLNewsModel *)newsModel {
    _newsModel = newsModel;
    
    [self.msl_ImageView sd_setImageWithURL:[NSURL URLWithString:_newsModel.imgsrc]];
    
    self.msl_Title.text = _newsModel.title;
    self.msl_digest.text = _newsModel.digest;
    self.msl_replyCount.text = [NSString stringWithFormat:@"跟帖数%@", newsModel.replyCount];
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

@end
